package models

type AdCoupon struct {
	ID            string  `json:"id" gorm:"column:id;primaryKey;type:int;size:64;comment:主键,ID"`
	Name          string  `json:"name" gorm:"column:name;type:varchar(256);comment:名称"`
	DeviceGroupID string  `json:"device_group_id" gorm:"column:device_group_id;type:varchar(256);comment:设备组ID数组"`
	StartAt       int64   `json:"start_at" gorm:"column:start_at;type:int;size:64;comment:起始时间"`
	EndAt         int64   `json:"end_at" gorm:"column:end_at;type:int;size:64;comment:终止时间"`
	SalesOff      float32 `json:"sales_off" gorm:"column:sales_off;type:decimal(10,2);default:0.00;comment:优惠金额"`
	LocationIDs   string  `json:"location_ids" gorm:"column:location_ids;type:varchar(1024);comment:区域ID数组"`
	Status        int     `json:"status" gorm:"column:status;type:int;size:64;comment:状态 0生效 1删除"`
}

func (AdCoupon) TableName() string {
	return "ad_coupon"
}

// 模式自动注册
func init() {
	Models = append(Models, &AdCoupon{})
}
